
<?php
session_start();
require_once '../models/_check_admin.php';
require_once '../models/Product.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>List Brand</title>
<?php include_once '../admin/_meta.php';
?>
<script type="text/javascript" src="../js/jquery.7.1.min.js"></script>
	<script type="text/javascript" src="../js/jquery.form.js"></script>
	<script type="text/javascript" src="../js/script.js"></script>
</head>
<body>
	<div id="firstLine">
		<div id="top-bar">
		<?php include '_top_bar_admin.php';?>
		</div>
	</div>
	<div id="container">
		<div id="header">
			<?php include '_menu_admin.php';?>
		</div>
		<div id="center">
			<div id="table-user">
			<div>
					<table id="table-admin">
						<tr>
							<td colspan="2"><b>Add Brand</b></td>
						</tr>
						<tr>
							<td><span>Brand Name</span></td>
							<td><input type="text" name="brandName" id="brandName"></td>
						</tr>
						<tr>
						<!-- loader.gif -->
					<img style="display:none" id="loader" src="../images/loader.gif" alt="Loading...." title="Loading...." />
						<td>Image:</td>
						<td><div class="wrap">
						<!-- simple file uploading form -->
						<form id="form" action="../models/ajaxupload-brand.php" method="post" enctype="multipart/form-data">
							<input id="uploadImage" type="file" accept="image/*" name="image" />
							<input id="button" type="submit" value="Upload">
						</form>
						<!-- preview action or error msgs -->
						<div id="preview" style="display:none"></div>
						</div><!--wrap--></td>
					</tr>
						<tr>
							<td><input type="button" name="btn_submit" value="Add" class="btn_submit" onclick="addBrand();"></td>
							<td><a href="list_product.php"><input type="button" name="reset" value="Cannel" class="btn_submit"></a></td>
						</tr>
					</table>
					<div class="clear-both"></div>
				</div>
					<div class="clear-both"></div>
					<div class="view-content">
						<div class="loading-container">
							<span class="loading-image" id="submit-loading"></span>
						</div>
						<div class="ajax-content" id="brand-div">
							<?php Product::printBrandTable('');?>
						</div><br/>				
					</div>		
			</div>
		</div>
	</div>
	<div>
		<?php include '_footer_admin.php';?>
	</div>
</body>
</html>